package com.eastfair.venuebooking.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * 支付系统 付款信息VO.
 *
 * @author dqq
 * @date 2022 /7/9
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "ContractFinanceDTO", description = "合同财务信息")
public class PayApiContractFinanceVO implements Serializable {

    private Map<String, Object> echoMap = new HashMap<>();

    /**
     * 付款计划总期
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String payPlanTotal;
    /**
     * 完成期数
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String finishTotal;
    /**
     * 逾期期数
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String overdueTotal;

    /**
     * 已付款金额
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public BigDecimal payedAmount;
    /**
     * 未付款金额
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public BigDecimal unPayedAmount;
    /**
     * 已开票金额
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public BigDecimal invoiceAmount;
    /**
     * 未开票金额
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public BigDecimal unInvoiceAmount;
    /**
     * 最后支付时间
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public String lastPayTime;
}